home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / readers / nn-tk.001 / nn-tk~ / nn / doc / NNTP < prev    next >
Text File  |  1995-08-21  |  7KB  |  202 lines

  1.                  NNTP SUPPORT
  2.                  ------------
  3.  
  4. This file describes the NNTP support available in nn .  The
  5. NNTP support was implemented by Rene' Seindal, seindal@diku.dk.
  6.  
  7.  
  8.                 PREREQUISITES
  9.                 -------------
  10.  
  11. First of all, you need read-access to an NNTP-server, and if you want
  12. to post, the server must allow that.
  13.  
  14. The necessary modules to access a remote NNTP server is an integrated
  15. part of nn, so if you specify to use NNTP, the necessary code is
  16. automatically included.
  17.  
  18. A recent version of the `mini-inews' program which is required to post
  19. articles via an NNTP server is also included for your convenience.
  20. See the INEWS section below.
  21.  
  22.                  HOW IT WORKS
  23.                  ------------
  24. With NOV (Network OVeriew) NN will function as a pure NNTP client,
  25. it can access both news articles and the NOV article database.
  26.  
  27.  
  28.                 CONFIGURATION
  29.                 -------------
  30.  
  31. To use NNTP in nn, you must edit the relevant parts of config.h:
  32.  
  33. NNTP
  34.     You enable the use of NNTP by defining the macro NNTP.
  35.  
  36. NNTP_SERVER
  37.     Both the master and the clients will look up their NNTP-server
  38.     in the file given by the macro NNTP_SERVER.  If the name is not
  39.     an absolute path name, it is taken to be relative to
  40.     LIB_DIRECTORY.
  41.  
  42.     The format of the file is compatible with the one used in
  43.     clientlib.c in the nntp-1.5 distribution, i.e., the first
  44.     non-blank line, not starting with '#' is taken to be the name of
  45.     the NNTP-server.  This file MUST be present, and must contain a
  46.     valid host name.
  47.  
  48. NNTP_POST
  49.     If you use the NNTP based inews (part on the NNTP distribution)
  50.     and you have hosts that are not allowed to post to the NNTP
  51.     server, you should defined this.  It will make nn check at
  52.     connect time whether the NNTP server allows postings, and reject
  53.     all attempts to post, if the server disallows posting.  If you
  54.     do not define this, users will be allowed to post by nn, but the
  55.     posting will eventually fail.
  56.  
  57.     Again, this parameter is only relevant, if you use the NNTP
  58.     based inews, and have hosts that are not allowed to post.
  59.  
  60. NNTP_MINI_INEWS_HEADER
  61.     This should not be set if you are using the INEWS that
  62.     comes with NN, but may be required if you are using the
  63.     separate NNTP distribution.
  64.  
  65. NEWS_LIB_DIRECTORY & INEWS
  66.     If either is defined, they specify the destination of the
  67.     mini-inews program when installed below with INEWS being used
  68.     if both are defined.  If neither is defined, it will be
  69.     installed in /usr/lib/news/inews.
  70.  
  71. EXCELAN
  72.     This is unlikely to be required.
  73.  
  74.     You can define this symbol if your tcp/ip is based on the
  75.     EXCELAN implementation (no netdb.h, no getservbyname(), no
  76.     gethostbyname()).  (This belongs in the s- file!)
  77.     You will (probably) also need to add -lsocket to NNTP_EXTRA_LIB.
  78.     Normally it will use port 119 for nntp, but this can be modified
  79.     through "#define IPPORT_NNTP 1150" (or similar) in the init file.
  80.  
  81. NO_BZERO
  82. NO_RENAME
  83.     You can define these symbols if your system doesn't provide
  84.     the bzero() and/or rename() functions (these #define:s belong
  85.     in the s- file).
  86.  
  87. NNTP_EXTRA_LIB
  88.     Here you can specify libraries and loader flags which are only
  89.     needed when compiled with NNTP.  The normal EXTRA_LIB is still
  90.     used.
  91.     
  92.         
  93.                 TUNING
  94.                 ------
  95.  
  96. Both the server and each client maintains a cache of recently accessed
  97. articles, to minimize communication with the server (mainly to avoid
  98. fetching large digests continuously).  The master needs the cache when
  99. it splits digests, and the clients need it, because nn has a tendency to
  100. reopen the articles several times.
  101.  
  102. NN caches articles since it tends open articles several times. The cache
  103. is kept in the users .nn directory.  The constant NNTPCACHE (defined in
  104. nntp.c but can be redefined in config.h) defines the size of the cache,
  105. whose optimal size depends on the amount of news kept on line on the
  106. NNTP-server.  Values of 5-10 gives reasonable results.  The effect is
  107. most striking when reading digested news.
  108.  
  109. The location and size of the cache can also be changed on a per-user
  110. basis via the related nntp- variables (see nn.1).
  111.  
  112.  
  113.                  INSTALLATION
  114.                  ------------
  115.  
  116. Making and installing nn using NNTP does not differ from a non-NNTP nn
  117. installation, except for the differences in the configuration and the
  118. need to specify the NNTP server in the NNTP_SERVER file.
  119.  
  120.                 INEWS
  121.                 -----
  122.  
  123. If you want to post news via the NNTP server, you will need to run a
  124. program named `(mini-)inews' which is included in the normal NNTP
  125. distribution.  However, since this is the only part of the NNTP you
  126. need to run nn, a recent version (1.5.7) of the mini-inews program is
  127. included with nn in the inews/ directory.
  128.  
  129. If you already have installed and maintain mini-inews on your system,
  130. you should not use the version that comes with nn - it would just be
  131. extra unnecessary work.
  132.  
  133. However, if you don't run mini-inews already, using the version that
  134. comes with nn will be somewhat simpler to configure, because it takes
  135. advantage of the definitions you have already made for nn in config.h.
  136.  
  137. Thanks to Steve Simmons who contributed the simplified inews
  138. configuration (which I took the freedom to simplify even further).
  139.  
  140. To configure and install mini-inews, all you should need to do is
  141. (everything must be done with inews/ as current working directory):
  142.  
  143.     $ cd inews
  144.     $ edit conf.h    -- modify as described in the file
  145.     $ make
  146.  
  147. If things work, type:
  148.  
  149.     $ su
  150.     # make install
  151.  
  152. As far as I know, NNTP_MINI_INEWS_HEADER needs to be defined in
  153. nn's config.h for nn to work with this mini-inews version.
  154.  
  155. See the files inews/README.NN and inews/README for further information.
  156.  
  157.                    PROBLEMS
  158.                    --------
  159.  
  160. I am not certain what should happen if the server sends back responses
  161. in the 1xx range.  I do not know whether a NNTP server is allowed to
  162. return one of these responses on its own initiative.  If it is, nn
  163. should probably ignore (or display) the messages.  Currently, nothing is
  164. done to treat these responses in any way.
  165.  
  166.               SPONTANEOUS NNTP ERROR 502
  167.               --------------------------
  168.  
  169. Sometimes nn  may stop with the following message:
  170.  
  171.     NNTP 502 You only have permission to transfer, sorry. 
  172.  
  173. This particular case is probably the result of the NNTP server trying to
  174. turn your IP address into a fully qualified domain name (FQDN) so it can
  175. look you up in its access file.
  176.  
  177. The NNTP server probably uses the domain name server (DNS) to map IP
  178. addresses into FQDNs.  If the local DNS doesn't already know the answer, it
  179. has to go out over the network to find it.  This can take a few seconds, and
  180. the library routine that does all this for the NNTP server might time out
  181. before the answer gets back to it.  If this happens, the NNTP server doesn't
  182. know your FQDN, so it gives you the default access specified in the server's
  183. nntp_access file, which is usually "xfer" (article transfer only).
  184.  
  185. In the time it takes for you to run nn again the DNS usuallu has its answer
  186. back, so things usually work the second time.  
  187.  
  188. One way to work around this problem is to specify the IP address of the
  189. client in the nntp server's access file; then it is not necessary to lookup
  190. the FQDN.
  191.  
  192. Thanks to Tim Ramsey and Nick Sayer for this information.
  193.  
  194.  
  195.               DEBUGGING NNTP CONNECTIONS
  196.               --------------------------
  197.  
  198. In  nn  you can turn on the nntp-debug variable in
  199. the init file.
  200.  
  201.  
  202.